package com.hyt.it.ogt.ykcj.common.enums.zs;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description:    证书授予对象：1-全部已归档考生，2-考试结果
 * @Author: STARF
 * @CreateDate: 2022/06/24 15:02
 **/
@Getter
@AllArgsConstructor
public enum CertificateGrantObjectEnums {

    ARCHIVED(1, "全部已归档考生"),
    EXAM_GRADE(2, "考试结果"),
    ;

    private final Integer code;
    private final String desc;

    public static CertificateGrantObjectEnums getByCode(Integer code) {
        for (CertificateGrantObjectEnums enums : values()) {
            if (enums.getCode().equals(code)) {
                return enums;
            }
        }
        return null;
    }
}
